<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="../课件/jquery-2.1.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
				$('div').hide().eq(0).show();
				var $span = $('span');
				$span.click(function(){
					console.log()
					$('div').hide().eq($(this).index()).show();
				})
			})
		</script>
	</head>
	<body>
		<span>选项1</span>&nbsp;&nbsp;&nbsp;<span>选项2</span>&nbsp;&nbsp;&nbsp;<span>选项3</span>
		<div style="background: gray;height: 50px;">内容1</div>
		<div style="background: gray;height: 50px;">内容2</div>
		<div style="background: gray;height: 50px;">内容3</div>
	</body>
</html>
